<%-- 
    Document   : lookFriend
    Created on : 2017-2-22, 21:01:06
    Author     : DELL
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="friendManager.LookFriendBean" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>通讯录管理——查看通讯录页面</title>
    </head>
    <body>
        <hr noshade>
        <div align="center">
            <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
                <tr>
                    <td width="25%">
                        <a href="http://localhost:8081/PersonInforMSys/friendManager/addFriend.jsp">增加联系人</a>
                    </td>
                    <td width="25%">
                        查看通讯录
                    </td> 
                    <td width="25%">
                        <a href="http://localhost:8081/PersonInforMSys/friendManager/updateFriend.jsp">修改联系人</a>
                    </td>     
                    <td width="25%">
                        <a href="http://localhost:8081/PersonInforMSys/friendManager/deleteFriend.jsp">删除联系人</a>
                    </td>
                </tr>
            </table>
        </div>

        <hr noshade>
        <br><br>
    <table  width="60%" align="center" border="2" cellspacing="0" cellpadding="0" bgcolor="gray">

        <tr align="center">
            <th height="30">用户姓名</th>
            <th height="30">用户电话</th>
            <th height="30">邮箱地址</th>
            <th height="30">家庭住址</th>
            <th height="30">用户QQ</th>
        </tr>
        <%
            ArrayList friendsList = (ArrayList) session.getAttribute("friendsList");
            if (friendsList == null || friendsList.size() == 0) {


        %>
        <div align="center">

            <h1>您还没有任何联系人！</h1>


        </div>
        <%} else {
            for (int i = friendsList.size() - 1; i >= 0; i--) {

                LookFriendBean ffBean = (LookFriendBean) friendsList.get(i);


        %>


        <tr>
            <td height="30" align="center"><%=ffBean.getName()%></th>
                  <td height="30"  align="center"><%=ffBean.getPhone()%></th>
                        <td height="30"  align="center"><%=ffBean.getEmail()%></th>
                              <td height="30"  align="center"><%=ffBean.getAddr()%></th>
                                    <td height="30"  align="center"><%=ffBean.getQq()%></th>

        </tr>
        <%                }

            }
        %>


    </table>
</body>
</html>
